package cn.tedu.hotel.serve.pojo.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class HotelUpdateDTO implements Serializable {


    private Long id;

    @NotNull(message = "必须提交名字")
    @NotEmpty(message = "名字不能为空")
    private String name;

    @NotNull(message = "必须提交地点")
    @NotEmpty(message = "地点不能为空")
    private String location;

    @NotNull(message = "必须提交简介")
    @NotEmpty(message = "简介不能为空")
    private String description;

    private String url;

    @NotNull(message = "基本价格不能为空")
    @Range(min = 1,message = "请提交有效值")
    private BigDecimal basePrice;

    @NotNull(message = "酒店等级不能为空")
    @Range(min = 1,message = "请提交有效值")
    private Long levelId;
}